<template>
 <div>
     <h1>我是A组件</h1>
     <button @click="sendMsg">点击传递</button>
 </div>
</template>

<script>
import vm from '../../utils/vm'
export default {
    data(){
         return{
             msgFromA:'A组件的数据'
         }
    },
    created(){},
    methods:{
        sendMsg(){
            // 传递
            vm.$emit('sendMsg',this.msgFromA)
        }
    },
    components:{}
}

</script>
<style scoped>
</style>